<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>::Happy - DTAC Prepaid Phone::</title>
<link href="${RESOURCE}/css/global.css" rel="stylesheet" type="text/css">
<link href="${RESOURCE}/css/global-en.css" rel="stylesheet" type="text/css">
<link href="${RESOURCE}/css/customize.css" rel="stylesheet" type="text/css">
<script src="${RESOURCE}/scripts/security.js" type="text/javascript"></script>

<script language=JavaScript>

function printWindow(){

browserVersion = parseInt(navigator.appVersion)

if (browserVersion >= 4) window.print()

}



function include(xUrl,xId) {

  var xmlhttp = false;

  /*@cc_on @*/

  /*@if (@_jscript_version >= 5)



  // JScript gives us Conditional compilation, we can cope with old IE versions.

  // and security blocked creation of the objects.

  try {

    xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");

   } catch (e) {

      try {

        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");

      } catch (E) {

        xmlhttp = false;

      }

   }



  /*@end @*/

  if (!xmlhttp && typeof XMLHttpRequest!='undefined') {

    xmlhttp = new XMLHttpRequest();

  }



  xmlhttp.open("GET", xUrl,true);

  xmlhttp.onreadystatechange=function() {

          if (xmlhttp.readyState==4) {

                document.getElementById(xId).innerHTML = xmlhttp.responseText;

          }

  }

  xmlhttp.send(null)

}





function MM_preloadImages() { //v3.0

  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();

    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)

    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}

}



function input_KeyPress(fld, evt)

{

	var charCode = (evt.which) ? evt.which : event.keyCode

	if (charCode == 59) {

		return false;

	}

	else {

		return true;

	}

}



function setSendOtpSubr(action) {

		var frm = document.forms[0];

		if(action == 'enable') {

			frm.sendOTPSubrNum.disabled = false ;

		} else {		

			frm.sendOTPSubrNum.value = "" ;

			frm.sendOTPSubrNum.disabled = true ;			

		}

}



function doSubmit() {    

    if(!checkField()){

       return;

   }     	     

   document.form1.submit();

}



function isValidPswd(textObj)

{

  var newValue = textObj.value;

  var format = /^[0-9]{4}$/;

  if(format.test(newValue)) {

  	return true;

  } else {

    return false;

  }

}



function emptyField(textObj)

{

  if (textObj.value.length == 0) return true;

  for (var i=0; i<textObj.value.length; ++i) {

    var ch = textObj.value.charAt(i);

    if(ch != ' ' && ch != '\t') return false;

  }

  return true;

}



function isValidEmail(email)

{

	//var x = document.form1.inputEmail.value;

	//var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	var filter  = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;

	if (filter.test(email) ) {

		//alert('YES! Correct email address');

		return true;

	}else {

		//alert("Email address เน?เธกเน?เธ?เธนเธ?เธ?เน?เธญเธ?");

		return false;

	}

}



function isCheckSubrNo(SubrNo){

	var errorMessage = "";  

	var validSubrNo = /^[0][8][0-9]{8}$/;

	if ( !validSubrNo.test(SubrNo) ) errorMessage += "Password character must be between 0-9\n";  //bfmom version is also Thai

	if ( errorMessage.length > 0 ) {

       // alert("เธ?เน?เธญเธกเธนเธฅเน?เธกเน?เธ?เธนเธ?เธ?เน?เธญเธ? :\n\n" + errorMessage);

        return false;

    }    

 return true;

}





function checkSmsLginNotif(){

	var frm = document.forms[0];

	if(frm.smsLginNotif[0].checked == true || frm.smsLginNotif[1].checked == true){

		return false;

	}else{

		return true;

	}

}

function checkSendOtp(){

	var frm = document.forms[0];

	if(frm.sendOtp[0].checked == true || frm.sendOtp[1].checked == true){

		return false;

	}else{

		return true;

	}

}

function checkSendOtpSubr(){

	var frm = document.forms[0];

	if(frm.sendOtp[1].checked == true){

		if( frm.sendOTPSubrNum.value == "" ) {

			return true ;

		}

	}

	return false;

}

function checkField(){

	var f = document.forms[0];

	<!--SVLT.LOOP:PASSWORDLOOP-->

	if(emptyField(f.password)){

		alert("Please enter new password.");

		f.password.focus();

	} else if(!isValidPswd(f.password)) {

		alert("Please input your new password in numeric 4 digits.");

		f.password.focus();

	} else if(emptyField(f.confirm_password)){

		alert("Please enter confirm new password.");

		f.confirm_password.focus();

	} else if (f.password.value != f.confirm_password.value){

		alert("Please check confirm new password equals new password.");

		f.confirm_password.focus();

	} else 

	<!--SVLT.END:PASSWORDLOOP-->  	

	if(emptyField(f.inputFname)){

		alert("Please enter firstname/organization's name.");

		f.inputFname.focus();

	}

	//----- Add by XXX ------

	else if(f.inputFname.value.indexOf(";") != -1) {

		alert("Please not enter ';'");

		f.inputFname.focus();

	}   else if (!checkTextNoScript(f.inputFname.value)){
    	
    	alert("Please check correct firstname/organization's name.");
        
        f.inputFname.focus();
	
	} 	else if(f.inputEmail.value.indexOf(";") != -1) {

		alert("Please not enter ';'");

		f.inputEmail.focus();

//	}	else if (!isValidEmail(f.inputEmail.value) && !emptyField(f.inputEmail )){
	}   else if (!isValidEmail(f.inputEmail.value) || emptyField(f.inputEmail )){

		alert("Please check  correct email address. ");

		f.inputEmail.focus();

	}	else if(emptyField(f.sendOTPSubrNum) && f.sendOtp[1].checked == true) {

		alert("Please enter your mobile number.");

		f.sendOTPSubrNum.focus();

	} else if(!isCheckSubrNo(f.sendOTPSubrNum.value) && f.sendOtp[1].checked == true) {

		alert("Invalid data : \n\nMobile Number must have 10 digits and must be in numeric only.");

		f.sendOTPSubrNum.focus();

	//------- End ------

	}  else if(checkSmsLginNotif()) { 

		alert("Please choose if sms sent to notify when your phone no accesing webเน?"); //Bouy added

		f.smsLginNotif[0].focus();

	} else if(checkSendOtp()){ 

		alert("Please choose if sending the One Time Password to another phone noเน?"); //Bouy added

		f.smsLginNotif[0].focus();	

	} else if(checkSendOtpSubr()) {

		alert("Please fill in the phone number for the One Time Passowrd"); //Bouy added

		f.sendOTPSubrNum.focus();	

	} else if(f.ques.value=="-"){

		alert("Please select hint question.");

		f.ans1.focus();

	} else if(emptyField(f.ans)){

		alert("Please enter hint answer.");

		f.ans.focus();

	}

	else{	       

		return true;

	}

	return false;



}



<!--



function MM_preloadImages() { //v3.0

  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();

    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)

    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}

}





// Declaring required variables

var digits = "0123456789";



// non-digit characters which are allowed in phone numbers

var phoneNumberDelimiters = "()- ";



// characters which are allowed in international phone numbers

// (a leading + is OK)

var validWorldPhoneChars = phoneNumberDelimiters + "+";



// Minimum no of digits in an international phone no.

var minDigitsInIPhoneNumber = 10;



function isInteger(s)

{   var i;

    for (i = 0; i < s.length; i++)

    {   

        // Check that current character is number.

        var c = s.charAt(i);

        if (((c < "0") || (c > "9"))) return false;

    }



    // All characters are numbers.

    return true;

}



function stripCharsInBag(s, bag)

{   var i;

    var returnString = "";



    // Search through string's characters one by one.

    // If character is not in bag, append to returnString.

    for (i = 0; i < s.length; i++)

    {   

        // Check that current character isn't whitespace.

        var c = s.charAt(i);

        if (bag.indexOf(c) == -1) returnString += c;

    }



    return returnString;

}



function checkInternationalPhone(strPhone){

	s = stripCharsInBag(strPhone,validWorldPhoneChars);

	return (isInteger(s) && s.length >= minDigitsInIPhoneNumber);

}



function ValidateForm(){

	var Phone=document.form1.inputUserName;



	document.form1.submit();

 }



function MM_openBrWindow(theURL,winName,features) { //v2.0

  window.open(theURL,winName,features);

}



function alertChgMobileNumb(){

  var format = /^[0-9]{9}$/;

   

  if(format.test(document.form1.inputUserName.value)) { 

			alert("ตั้งแต่วันที่ 1 กันยายน เป็นต้นไป รหัสผู้ใช้ 9 หลัก จะเปลี่ยนเป็น 10 หลัก โดยใส่ 08 แทน 0 ตัวหน้า \nในครั้งต่อไปกรุณาใช้รหัสผู้ใช้ 10 หลักในการใช้บริการผ่านเว็บ.");

	}



	document.form1.submit();

}

//-->

</script> 

</head>
<body>
<div id="header">
    <%@include file="../head.jsp" %>
</div>

<div id="container">
	<div id="pathway"><img src="${RESOURCE}/eng/images/clear.gif" width="1" height="1"><a href="/bp3/bin/DpromptIndex"  class="link2">Web service</a> > <a href="/bp3/bin/Dspc/DpromptWelcome"  class="link2">Profile and Service</a> > Change User Info</div>
	<div id="main">
    	<%@ include file="../menu.jsp" %>
    	<div id="content">
        	<div class="content-middle">
                
                <!--เนื้อหาเริ่มที่นี่-->
                <h3><img src="${RESOURCE}/eng/images/14_webservice_head01.gif"></h3>
               	<table width="100%" cellpadding="2" cellspacing="2" height="500">
                  	<tr>
                    	<td valign="top">
						
							<table width="650" border="0" cellspacing="0" cellpadding="0">

								  <!--SVLT.VAR:CONF_TOP-->
								
								  <tr> 
								
									<td height="40"><table width="100%" border="0" cellspacing="3" cellpadding="0">
								
										<tr> 
								
										  <td width="2%"><img src="${RESOURCE}/eng/images/14_webservice_bullet01.gif" width="9" height="9"></td>
								
										  <td width="98%" class="textnormal_bold"><img src="${RESOURCE}/eng/images/14_webservice_subtitle15.gif" width="350" height="22"></td>
								
										</tr>
								
									  </table></td>
								
								  </tr>
								
								  <tr> 
								
									<td height="15" align="left"><font color="#FF0000" class="textredsmall"><br>
								
									</font></td>
								
								  </tr>
								
								  <tr> 
								
									<td height="50" align="center" valign="bottom"><table width="100%" border="0" cellspacing="0" cellpadding="0">
								
									  <tr>
								
										<td width="49%" background="${RESOURCE}/eng/images/14_webservice_tabline.gif">&nbsp;</td>
								
										<td width="101"><a href="/bp3/bin/Dspc/DpromptChangeUserInfoForm"><img src="${RESOURCE}/eng/images/14_editprofile_tab01_o.gif" alt="Edit Personal Details" width="160" height="43" border="0"></a></td>
								
										<td width="160"><a href="/bp3/bin/DpromptChngPassword"><img src="${RESOURCE}/eng/images/14_editprofile_tab02_i.gif" alt="Reset Password" width="160" height="43" border="0"></a></td>
								
										<td width="160"><a href="/bp3/bin/Dspc/DpromptDecreaseMobileForm"><img src="${RESOURCE}/eng/images/14_editprofile_tab03_i.gif" alt="Cancel Web Services" width="161" height="43" border="0"></a></td>
								
										<td background="${RESOURCE}/eng/images/14_webservice_tabline.gif">&nbsp;</td>
								
									  </tr>
								
									  <tr>
								
										<td colspan="5"><table width="100%" border="0">
								
										  <tr class="textnormal_bold">
								
											<td align="center"><!--SVLT.LOOP:ERROR_BOX-->
								
												<br>
								
											  The system cannot complete your transaction because<br>
								
											  <span class="textnormalred">
								
												<!--SVLT.VAR:ERROR_MESSAGE-->
								
												</span><br>
								
												<!--SVLT.END:ERROR_BOX-->
								
											</td>
								
										  </tr>
								
										  <tr>
								
											<td>&nbsp;</td>
								
										  </tr>
								
										</table></td>
								
										</tr>
								
									  
								
									</table></td>
								
								  </tr>
								
								  <tr> 
								
									<td height="15" align="left"><br>
								
									  <span class="textnormal_bold">Editing Your Personal Details</span><br>
								
									  <span class="textnormal">The information you fill in below will be updated when clicking OK. Any box you do not edit will remain unaltered.</span><br>
								
									  <span class="textnormal">The box with <img src="${RESOURCE}/eng/images/st_r.gif" width="8" height="8">  is required. 
								
									  You cannot leave it blank.</span><br>
								
								
								
									  <br>
								
									  <br>
								
									  <br>
								
									  <p><form method="post" action="/bp3/bin/Dspc/DpromptChangeUserInfo" name="form1" onSubmit="return doSubmit()">
								
									  <table width="95%" border="0" align="center" cellpadding="2" cellspacing="5">
								
										<tr>
								
										  <td width="40%" align="left" class="textnormal"><span class="textnormal_bold">Your happy mobile number:</span><font color="#FF0000">*</font></td>
								
										  <td width="60%" align="left"><input name="new_username" type="text" class="txt_search_c04" size="21" value="<!--SVLT.VAR:WB_USER__NEW_USER_NAME-->"  READONLY>          </td>
								
										</tr>
								
										<!--SVLT.LOOP:PASSWORDLOOP-->
								
										<tr > 
								
										  <td  height="2"class="textnormal">
								
											<img src="/bp3/happywebservice/eng/images/bb.gif">
								
											<strong>New Password :</strong>must be 4 digits   </td>
								
										  <td  height="2" >                                             
								
											<strong><input type="password" name="password" size="10" maxlength="4"  class="txt_search_c04" value="<!--SVLT.VAR:passWord-->"></strong>									          </td>
								
										</tr>
								
										<tr> 
								
										  <td  height="2"class="textnormal">
								
											<img src="/bp3/happywebservice/eng/images/bb.gif">
								
											<strong>Confirm Password :</strong>          </td>
								
										  <td  height="2" >                                             
								
											<strong> 
								
											<input type="password" name="confirm_password" size="10" maxlength="4"  class="txt_search_c04" value="<!--SVLT.VAR:conFirm-->">
								
											</strong>									     </td>
								
										</tr>
								
										<!--SVLT.END:PASSWORDLOOP-->
								
										<tr>
								
										  <td width="40%" align="left" class="textnormal"><span class="textnormal_bold">Name - Surname:</span><font color="#FF0000">*</font></td>
								
										  <td width="60%" align="left"><input name="inputFname" type="text" class="txt_search_c04" size="21" onKeyPress="return input_KeyPress(this, event)" value="<!--SVLT.VAR:WB_USER__FRST_NAME-->" maxlength="100"></td>
								
										</tr>
								
										<tr>
								
										  <td width="40%" align="left" class="textnormal"><span class="textnormal_bold">E-mail:</span><font color="#FF0000">*</font></td>
								
										  <td width="60%" align="left"><input name="inputEmail" type="text" class="txt_search_c04" size="21" onKeyPress="return input_KeyPress(this, event)" value="<!--SVLT.VAR:WB_USER__EMAL_ADDR-->" maxlength="30"></td>
								
										</tr>
								
										<tr>
								
										  <td width="40%" align="left" class="textnormal">&nbsp;</td>
								
										  <td width="60%" height="30" align="left"><font color="#FF0000" class="textredsmall">System will send password to your e-mail address <br>
								
											if you forget your password.<br>
								
										  </font></td>
								
										</tr>
								
										<tr>
								
										  <td width="40%" align="left"><span class="textnormal_bold">Require SMS notification when your <br>
								
										  Happy no. log in to Web Services:</span><span class="style1"><font color="#FF0000">*</font></span></td>
								
										  <td width="60%" align="left" valign="top"><font color="#FF0000"><span class="textnormal">
								
											<input type="radio" name="smsLginNotif" class="textnormal" value="N" <!--SVLT.VAR:selectedNotSmsLginNotif-->>
								
											No
								
											<input type="radio" name="smsLginNotif" class="textnormal" value="Y" <!--SVLT.VAR:selectedSmsLginNotif-->>
								
											Yes</span></font></td>
								
										</tr>
								
										<tr>
								
										  <td width="40%" align="left" valign="top"><span class="textnormal_bold">Require to divert one-time <br>
								
											
								
											password to other mobile no. for <br>
								
											using Required Password Services <br>
								
											(e.g. Itemised Billing, Promotion  <br>
								
											 Switching etc.):</span><span class="style1"><font color="#FF0000">*</font></span><br>          </td>
								
											
								
										  <td width="60%" align="left" valign="top"><span class="textnormal">
								
											<input type="radio" name="sendOtp" value="N" class="textnormal" onClick="setSendOtpSubr('disable')"   <!--SVLT.VAR:selectedNotSendOTP--> >
								
											No <br>
								
											<input type="radio" name="sendOtp" value="Y" class="textnormal" onClick="setSendOtpSubr('enable')"   <!--SVLT.VAR:selectedSendOTP--> >
								
											Yes</span>&nbsp;&nbsp;
								
											<input name="sendOTPSubrNum" type="text" class="txt_search_c04" size="21" maxlength="10" value="<!--SVLT.VAR:WB_USER__SEND_OTP_SUBR-->">
								
											<br>
								
											<span class="textredsmall">(Please input dtac mobile no. to divert one-time password e.g.  08xxxxxxxx)<font color="#FF0000">
								
											</font></span><span class="textredsmall">
								
											<font color="#FF0000">Service users must take full responsibility for any damages that incur from </font><br>
								
											transferring one-time password to other for using your login account on Web Services.<br>
								
											</span></td>
								
										</tr>
								
										<tr>
								
										  <td width="40%" height="30" align="left" class="textnormal">Password reminder question<font color="#FF0000"> * </font>:</td>
								
										  <td width="60%" height="30" align="left"><select name="ques" id="ques" class="textnormal" style="width:250">
								
											  <option value='-'>Please choose&nbsp;&nbsp;&nbsp;&nbsp;</option>
								
											  <option value="1" <!--SVLT.VAR:select1--> > What is your favorite place ?</option>
								
											  <option value="2" <!--SVLT.VAR:select2--> > What is your favorite pet's name ?</option>
								
											  <option value="3"  <!--SVLT.VAR:select3--> > What is your favorite food ?</option>
								
											  <option value="4" <!--SVLT.VAR:select4--> > What is your girl friend/boyfriend's name ?</option>
								
											  <option value="5"  <!--SVLT.VAR:select5--> > What is your favorite toy ?</option>
								
										  </select></td>
								
										</tr>
								
										<tr>
								
										  <td width="40%" height="30" align="left" class="textnormal">Password reminder answer <font color="#FF0000"> * </font>:</td>
								
										  <td width="60%" height="30" align="left"><input name="ans" type="text" class="txt_search_c04" maxlength="40" size="21" value="<!--SVLT.VAR:ans-->"></td>
								
										</tr>
								
									  </table>
								
									 
								
									  <br>
								
									  <table width="95%" border="0" align="center" cellpadding="2" cellspacing="2">
								
								
								
										<tr class="textnormal">
								
										  <td align="left" class="textnormalred">*The Service Provider reserves the right to suspend or terminate the user's membership and the provision 
								
										  of other Web Services should the service users be found committing information given on registration is not genuine, current or complete.</td>
								
										</tr>
								
									  </table>
								
									  <br>
								
									  <br>
								
									  <table width="250" border="0" align="center" cellpadding="5" cellspacing="0">
								
										<tr align="center" valign="top">
								
										  <td><a href="javascript:doSubmit()"><img src="${RESOURCE}/eng/images/14_webservice_submit.gif" width="58" height="23" border="0"></a></td>
								
										  <td><a href="/bp3/bin/Dspc/DpromptWelcome"><img src="${RESOURCE}/eng/images/14_webservice_cancel.gif" width="58" height="23" border="0"></a></td>
								
										  <input type="hidden" name="inputPassword" value="<!--SVLT.VAR:NEWPASSWORD-->">
								
										  <input type="hidden" name="inputNewUserName" value="<!--SVLT.VAR:NEWUSERNAME-->">
								
										  <input type="hidden" name="changecase" value="<!--SVLT.VAR:CHANGECASE-->">
								
										  <input name="lang" type="hidden" id="lang" value="E" />
								
										</tr>
								
									  </table>
								
									  
								
									  <br>
								
									  <br>
								
									  <br>
								
									  </form></p>
								
									  <p><br>
								
									  </p></td>
								
								  </tr>
								
								  <!--SVLT.VAR:CONF_BOTTOM-->
								
								</table>
								
								<SCRIPT LANGUAGE="JavaScript">
								
								var frm1 = document.forms[0];
								
									if(frm1.sendOtp[1].checked == true){
								
										frm1.sendOTPSubrNum.disabled = false ;	
								
									} else {
								
										frm1.sendOTPSubrNum.disabled = true ;			
								
									}
								
								</script>
						
						</td>
                 	</tr>
              	</table>                
                <!--เนื้อหาสิ้นสุดที่นี่-->
                
            </div>
            <div class="content-bottom"></div>
        </div>
    </div>
</div>
<div id="footer">
<img src="${RESOURCE}/eng/images/copy_right.jpg" />
<a href="http://www.dtac.co.th" target="_blank"><img src="${RESOURCE}/eng/images/dtact_logo.jpg" border="0" /></a>
<a href="http://www.happyvirus.com" target="_blank"><img src="${RESOURCE}/eng/images/virus_icon.jpg" border="0" /></a>
</div>
</body>
</html>
